import 'package:flutter/material.dart';
import 'package:flutter_smart_heating/ui/ui.dart';

class QrcodeButtonView extends StatelessWidget {
  const QrcodeButtonView({
    super.key,
    this.onTap,
    this.icon,
    this.text,
  });

  final Function()? onTap;
  final IconData? icon;
  final String? text;
  @override
  Widget build(BuildContext context) {
    return UiTap(
      onTap: () {
        onTap?.call();
      },
      child: Column(
        children: [
          Icon(
            icon,
            color: Colors.white,
            size: 35,
          ),
          const SizedBox(height: 8),
          Text(
            '$text',
            style: const TextStyle(
              color: Colors.white,
              fontSize: 12,
              shadows: [
                Shadow(
                  color: Colors.black54,
                  blurRadius: 5,
                ),
              ],
            ),
          )
        ],
      ),
    );
  }
}
